<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/widgets/qabstractslider.cpp -->
<head>
  <title>Qt 4.3: QAbstractSlider Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QAbstractSlider Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QAbstractSlider class provides an integer value within a range. <a href="#details">More...</a></p>
<pre> #include &lt;QAbstractSlider&gt;</pre><p>Inherits <a href="qwidget.html">QWidget</a>.</p>
<p>Inherited by <a href="qdial.html">QDial</a>, <a href="qscrollbar.html">QScrollBar</a>, and <a href="qslider.html">QSlider</a>.</p>
<ul>
<li><a href="qabstractslider-members.html">List of all members, including inherited members</a></li>
<li><a href="qabstractslider-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qabstractslider.html#SliderAction-enum">SliderAction</a></b> { SliderNoAction, SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, ..., SliderMove }</li>
</ul>
<a name="properties"></a>
<h3>Properties</h3>
<p><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"/><b><a href="qabstractslider.html#invertedAppearance-prop">invertedAppearance</a></b> : bool</li>
<li><div class="fn"/><b><a href="qabstractslider.html#invertedControls-prop">invertedControls</a></b> : bool</li>
<li><div class="fn"/><b><a href="qabstractslider.html#maximum-prop">maximum</a></b> : int</li>
<li><div class="fn"/><b><a href="qabstractslider.html#minimum-prop">minimum</a></b> : int</li>
<li><div class="fn"/><b><a href="qabstractslider.html#orientation-prop">orientation</a></b> : Qt::Orientation</li>
<li><div class="fn"/><b><a href="qabstractslider.html#pageStep-prop">pageStep</a></b> : int</li>
</ul></td><td valign="top"><ul>
<li><div class="fn"/><b><a href="qabstractslider.html#singleStep-prop">singleStep</a></b> : int</li>
<li><div class="fn"/><b><a href="qabstractslider.html#sliderDown-prop">sliderDown</a></b> : bool</li>
<li><div class="fn"/><b><a href="qabstractslider.html#sliderPosition-prop">sliderPosition</a></b> : int</li>
<li><div class="fn"/><b><a href="qabstractslider.html#tracking-prop">tracking</a></b> : bool</li>
<li><div class="fn"/><b><a href="qabstractslider.html#value-prop">value</a></b> : int</li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div class="fn"/>56 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qabstractslider.html#QAbstractSlider">QAbstractSlider</a></b> ( QWidget * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qabstractslider.html#dtor.QAbstractSlider">~QAbstractSlider</a></b> ()</li>
<li><div class="fn"/>bool <b><a href="qabstractslider.html#tracking-prop">hasTracking</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qabstractslider.html#invertedAppearance-prop">invertedAppearance</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qabstractslider.html#invertedControls-prop">invertedControls</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qabstractslider.html#sliderDown-prop">isSliderDown</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qabstractslider.html#maximum-prop">maximum</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qabstractslider.html#minimum-prop">minimum</a></b> () const</li>
<li><div class="fn"/>Qt::Orientation <b><a href="qabstractslider.html#orientation-prop">orientation</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qabstractslider.html#pageStep-prop">pageStep</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#invertedAppearance-prop">setInvertedAppearance</a></b> ( bool )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#invertedControls-prop">setInvertedControls</a></b> ( bool )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#maximum-prop">setMaximum</a></b> ( int )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#minimum-prop">setMinimum</a></b> ( int )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#pageStep-prop">setPageStep</a></b> ( int )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#setRange">setRange</a></b> ( int <i>min</i>, int <i>max</i> )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#singleStep-prop">setSingleStep</a></b> ( int )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#sliderDown-prop">setSliderDown</a></b> ( bool )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#sliderPosition-prop">setSliderPosition</a></b> ( int )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#tracking-prop">setTracking</a></b> ( bool <i>enable</i> )</li>
<li><div class="fn"/>int <b><a href="qabstractslider.html#singleStep-prop">singleStep</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qabstractslider.html#sliderPosition-prop">sliderPosition</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#triggerAction">triggerAction</a></b> ( SliderAction <i>action</i> )</li>
<li><div class="fn"/>int <b><a href="qabstractslider.html#value-prop">value</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"/>201 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div class="fn"/>12 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h3>Public Slots</h3>
<ul>
<li><div class="fn"/>void <b><a href="qabstractslider.html#orientation-prop">setOrientation</a></b> ( Qt::Orientation )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#value-prop">setValue</a></b> ( int )</li>
</ul>
<ul>
<li><div class="fn"/>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h3>Signals</h3>
<ul>
<li><div class="fn"/>void <b><a href="qabstractslider.html#actionTriggered">actionTriggered</a></b> ( int <i>action</i> )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#rangeChanged">rangeChanged</a></b> ( int <i>min</i>, int <i>max</i> )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#sliderMoved">sliderMoved</a></b> ( int <i>value</i> )</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#sliderPressed">sliderPressed</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#sliderReleased">sliderReleased</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#valueChanged">valueChanged</a></b> ( int <i>value</i> )</li>
</ul>
<ul>
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-types"></a>
<h3>Protected Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qabstractslider.html#SliderChange-enum">SliderChange</a></b> { SliderRangeChange, SliderOrientationChange, SliderStepsChange, SliderValueChange }</li>
</ul>
<a name="protected-functions"></a>
<h3>Protected Functions</h3>
<ul>
<li><div class="fn"/>SliderAction <b><a href="qabstractslider.html#repeatAction">repeatAction</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qabstractslider.html#setRepeatAction">setRepeatAction</a></b> ( SliderAction <i>action</i>, int <i>thresholdTime</i> = 500, int <i>repeatTime</i> = 50 )</li>
<li><div class="fn"/>virtual void <b><a href="qabstractslider.html#sliderChange">sliderChange</a></b> ( SliderChange <i>change</i> )</li>
</ul>
<ul>
<li><div class="fn"/>38 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"/>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"/>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QAbstractSlider class provides an integer value within a range.</p>
<p>The class is designed as a common super class for widgets like <a href="qscrollbar.html">QScrollBar</a>, <a href="qslider.html">QSlider</a> and <a href="qdial.html">QDial</a>.</p>
<p>Here are the main properties of the class:</p>
<ol type="1">
<li><a href="qabstractslider.html#value-prop">value</a>: The bounded integer that QAbstractSlider maintains.</li>
<li><a href="qabstractslider.html#minimum-prop">minimum</a>: The lowest possible value.</li>
<li><a href="qabstractslider.html#maximum-prop">maximum</a>: The highest possible value.</li>
<li><a href="qabstractslider.html#singleStep-prop">singleStep</a>: The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key.</li>
<li><a href="qabstractslider.html#pageStep-prop">pageStep</a>: The larger of two natural steps that an abstract slider provides and typically corresponds to the user pressing PageUp or PageDown.</li>
<li><a href="qabstractslider.html#tracking-prop">tracking</a>: Whether slider tracking is enabled.</li>
<li><a href="qabstractslider.html#sliderPosition-prop">sliderPosition</a>: The current position of the slider. If <a href="qabstractslider.html#tracking-prop">tracking</a> is enabled (the default), this is identical to <a href="qabstractslider.html#value-prop">value</a>.</li>
</ol>
<p>Unity (1) may be viewed as a third step size. <a href="qabstractslider.html#value-prop">setValue</a>() lets you set the current value to any integer in the allowed range, not just <a href="qabstractslider.html#minimum-prop">minimum</a>() + <i>n</i> * <a href="qabstractslider.html#singleStep-prop">singleStep</a>() for integer values of <i>n</i>. Some widgets may allow the user to set any value at all; others may just provide multiples of <a href="qabstractslider.html#singleStep-prop">singleStep</a>() or <a href="qabstractslider.html#pageStep-prop">pageStep</a>().</p>
<p>QAbstractSlider emits a comprehensive set of signals:</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Signal</th><th>Emitted when</th></tr></thead>
<tr valign="top" class="odd"><td><a href="qabstractslider.html#valueChanged">valueChanged</a>()</td><td>the value has changed. The <a href="qabstractslider.html#tracking-prop">tracking</a> determines whether this signal is emitted during user interaction.</td></tr>
<tr valign="top" class="even"><td><a href="qabstractslider.html#sliderPressed">sliderPressed</a>()</td><td>the user starts to drag the slider.</td></tr>
<tr valign="top" class="odd"><td><a href="qabstractslider.html#sliderMoved">sliderMoved</a>()</td><td>the user drags the slider.</td></tr>
<tr valign="top" class="even"><td><a href="qabstractslider.html#sliderReleased">sliderReleased</a>()</td><td>the user releases the slider.</td></tr>
<tr valign="top" class="odd"><td><a href="qabstractslider.html#actionTriggered">actionTriggered</a>()</td><td>a slider action was triggerd.</td></tr>
<tr valign="top" class="even"><td><a href="qabstractslider.html#rangeChanged">rangeChanged</a>()</td><td>a the range has changed.</td></tr>
</table></p>
<p>QAbstractSlider provides a virtual <a href="qabstractslider.html#sliderChange">sliderChange</a>() function that is well suited for updating the on-screen representation of sliders. By calling <a href="qabstractslider.html#triggerAction">triggerAction</a>(), subclasses trigger slider actions. Two helper functions <a href="qstyle.html#sliderPositionFromValue">QStyle::sliderPositionFromValue</a>() and <a href="qstyle.html#sliderValueFromPosition">QStyle::sliderValueFromPosition</a>() help subclasses and styles to map screen coordinates to logical range values.</p>
<p>See also <a href="qabstractspinbox.html">QAbstractSpinBox</a>, <a href="qslider.html">QSlider</a>, <a href="qdial.html">QDial</a>, <a href="qscrollbar.html">QScrollBar</a>, and <a href="widgets-sliders.html">Sliders Example</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="SliderAction-enum"></a>enum QAbstractSlider::SliderAction</h3>
<p><table border="1" cellpadding="2" cellspacing="1" width="40%">
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderNoAction</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderSingleStepAdd</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderSingleStepSub</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderPageStepAdd</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderPageStepSub</tt></td><td align="center" valign="top"><tt>4</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderToMinimum</tt></td><td align="center" valign="top"><tt>5</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderToMaximum</tt></td><td align="center" valign="top"><tt>6</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderMove</tt></td><td align="center" valign="top"><tt>7</tt></td></tr>
</table></p>
<h3 class="fn"><a name="SliderChange-enum"></a>enum QAbstractSlider::SliderChange</h3>
<p><table border="1" cellpadding="2" cellspacing="1" width="40%">
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderRangeChange</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderOrientationChange</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderStepsChange</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
<tr><td valign="top"><tt>QAbstractSlider::SliderValueChange</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<h3 class="fn"><a name="invertedAppearance-prop"></a>invertedAppearance : bool</h3>
<p>This property holds whether or not a slider shows its values inverted.</p>
<p>If this property is false (the default), the minimum and maximum will be shown in its classic position for the inherited widget. If the value is true, the minimum and maximum appear at their opposite location.</p>
<p>Note: This property makes most sense for sliders and dials. For scroll bars, the visual effect of the scroll bar subcontrols depends on whether or not the styles understand inverted appearance; most styles ignore this property for scroll bars.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool invertedAppearance () const</b></li>
<li><div class="fn"/><b>void setInvertedAppearance ( bool )</b></li>
</ul>
<h3 class="fn"><a name="invertedControls-prop"></a>invertedControls : bool</h3>
<p>This property holds whether or not the slider inverts its wheel and key events.</p>
<p>If this property is false, scrolling the mouse wheel &quot;up&quot; and using keys like page up will increase the slider's value towards its maximum. Otherwise pressing page up will move value towards the slider's minimum.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool invertedControls () const</b></li>
<li><div class="fn"/><b>void setInvertedControls ( bool )</b></li>
</ul>
<h3 class="fn"><a name="maximum-prop"></a>maximum : int</h3>
<p>This property holds the slider's maximum value.</p>
<p>When setting this property, the <a href="qabstractslider.html#minimum-prop">minimum</a> is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int maximum () const</b></li>
<li><div class="fn"/><b>void setMaximum ( int )</b></li>
</ul>
<h3 class="fn"><a name="minimum-prop"></a>minimum : int</h3>
<p>This property holds the sliders's minimum value.</p>
<p>When setting this property, the <a href="qabstractslider.html#maximum-prop">maximum</a> is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int minimum () const</b></li>
<li><div class="fn"/><b>void setMinimum ( int )</b></li>
</ul>
<h3 class="fn"><a name="orientation-prop"></a>orientation : <a href="qt.html#Orientation-enum">Qt::Orientation</a></h3>
<p>This property holds the orientation of the slider.</p>
<p>The orientation must be <a href="qt.html#Orientation-enum">Qt::Vertical</a> (the default) or <a href="qt.html#Orientation-enum">Qt::Horizontal</a>.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>Qt::Orientation orientation () const</b></li>
<li><div class="fn"/><b>void setOrientation ( Qt::Orientation )</b></li>
</ul>
<h3 class="fn"><a name="pageStep-prop"></a>pageStep : int</h3>
<p>This property holds the page step.</p>
<p>The larger of two natural steps that an abstract slider provides and typically corresponds to the user pressing PageUp or PageDown.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int pageStep () const</b></li>
<li><div class="fn"/><b>void setPageStep ( int )</b></li>
</ul>
<p>See also <a href="qabstractslider.html#singleStep-prop">singleStep</a>.</p>
<h3 class="fn"><a name="singleStep-prop"></a>singleStep : int</h3>
<p>This property holds the single step.</p>
<p>The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int singleStep () const</b></li>
<li><div class="fn"/><b>void setSingleStep ( int )</b></li>
</ul>
<p>See also <a href="qabstractslider.html#pageStep-prop">pageStep</a>.</p>
<h3 class="fn"><a name="sliderDown-prop"></a>sliderDown : bool</h3>
<p>This property holds whether the slider is pressed down.</p>
<p>The property is set by subclasses in order to let the abstract slider know whether or not <a href="qabstractslider.html#tracking-prop">tracking</a> has any effect.</p>
<p>Changing the slider down property emits the <a href="qabstractslider.html#sliderPressed">sliderPressed</a>() and <a href="qabstractslider.html#sliderReleased">sliderReleased</a>() signals.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isSliderDown () const</b></li>
<li><div class="fn"/><b>void setSliderDown ( bool )</b></li>
</ul>
<h3 class="fn"><a name="sliderPosition-prop"></a>sliderPosition : int</h3>
<p>This property holds the current slider position.</p>
<p>If <a href="qabstractslider.html#tracking-prop">tracking</a> is enabled (the default), this is identical to <a href="qabstractslider.html#value-prop">value</a>.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int sliderPosition () const</b></li>
<li><div class="fn"/><b>void setSliderPosition ( int )</b></li>
</ul>
<h3 class="fn"><a name="tracking-prop"></a>tracking : bool</h3>
<p>This property holds whether slider tracking is enabled.</p>
<p>If tracking is enabled (the default), the slider emits the <a href="qabstractslider.html#valueChanged">valueChanged</a>() signal while the slider is being dragged. If tracking is disabled, the slider emits the <a href="qabstractslider.html#valueChanged">valueChanged</a>() signal only when the user releases the slider.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool hasTracking () const</b></li>
<li><div class="fn"/><b>void setTracking ( bool <i>enable</i> )</b></li>
</ul>
<p>See also <a href="qabstractslider.html#sliderDown-prop">sliderDown</a>.</p>
<h3 class="fn"><a name="value-prop"></a>value : int</h3>
<p>This property holds the slider's current value.</p>
<p>The slider forces the value to be within the legal range: <a href="qabstractslider.html#minimum-prop">minimum</a> &lt;= <tt>value</tt> &lt;= <a href="qabstractslider.html#maximum-prop">maximum</a>.</p>
<p>Changing the value also changes the <a href="qabstractslider.html#sliderPosition-prop">sliderPosition</a>.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int value () const</b></li>
<li><div class="fn"/><b>void setValue ( int )</b></li>
</ul>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QAbstractSlider"></a>QAbstractSlider::QAbstractSlider ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs an abstract slider.</p>
<p>The <i>parent</i> arguments is sent to the <a href="qwidget.html">QWidget</a> constructor.</p>
<p>The <a href="qabstractslider.html#minimum-prop">minimum</a> defaults to 0, the <a href="qabstractslider.html#maximum-prop">maximum</a> to 99, with a <a href="qabstractslider.html#singleStep-prop">singleStep</a> size of 1 and a <a href="qabstractslider.html#pageStep-prop">pageStep</a> size of 10, and an initial <a href="qabstractslider.html#value-prop">value</a> of 0.</p>
<h3 class="fn"><a name="dtor.QAbstractSlider"></a>QAbstractSlider::~QAbstractSlider ()</h3>
<p>Destroys the slider.</p>
<h3 class="fn"><a name="actionTriggered"></a>void QAbstractSlider::actionTriggered ( int <i>action</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the slider action <i>action</i> is triggered. Actions are <a href="qabstractslider.html#SliderAction-enum">SliderSingleStepAdd</a>, <a href="qabstractslider.html#SliderAction-enum">SliderSingleStepSub</a>, <a href="qabstractslider.html#SliderAction-enum">SliderPageStepAdd</a>, <a href="qabstractslider.html#SliderAction-enum">SliderPageStepSub</a>, <a href="qabstractslider.html#SliderAction-enum">SliderToMinimum</a>, <a href="qabstractslider.html#SliderAction-enum">SliderToMaximum</a>, and <a href="qabstractslider.html#SliderAction-enum">SliderMove</a>.</p>
<p>When the signal is emitted, the <a href="qabstractslider.html#sliderPosition-prop">sliderPosition</a> has been adjusted according to the action, but the <a href="qabstractslider.html#value-prop">value</a> has not yet been propagated (meaning the <a href="qabstractslider.html#valueChanged">valueChanged</a>() signal was not yet emitted), and the visual display has not been updated. In slots connected to this signal you can thus safely adjust any action by calling <a href="qabstractslider.html#sliderPosition-prop">setSliderPosition</a>() yourself, based on both the action and the slider's value.</p>
<p>See also <a href="qabstractslider.html#triggerAction">triggerAction</a>().</p>
<h3 class="fn"><a name="rangeChanged"></a>void QAbstractSlider::rangeChanged ( int <i>min</i>, int <i>max</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the slider range has changed, with <i>min</i> being the new minimum, and <i>max</i> being the new maximum.</p>
<p>See also <a href="qabstractslider.html#minimum-prop">minimum</a> and <a href="qabstractslider.html#maximum-prop">maximum</a>.</p>
<h3 class="fn"><a name="repeatAction"></a><a href="qabstractslider.html#SliderAction-enum">SliderAction</a> QAbstractSlider::repeatAction () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Returns the current repeat action.</p>
<p>See also <a href="qabstractslider.html#setRepeatAction">setRepeatAction</a>().</p>
<h3 class="fn"><a name="setRange"></a>void QAbstractSlider::setRange ( int <i>min</i>, int <i>max</i> )</h3>
<p>Sets the slider's minimum to <i>min</i> and its maximum to <i>max</i>.</p>
<p>If <i>max</i> is smaller than <i>min</i>, <i>min</i> becomes the only legal value.</p>
<p>See also <a href="qabstractslider.html#minimum-prop">minimum</a> and <a href="qabstractslider.html#maximum-prop">maximum</a>.</p>
<h3 class="fn"><a name="setRepeatAction"></a>void QAbstractSlider::setRepeatAction ( <a href="qabstractslider.html#SliderAction-enum">SliderAction</a> <i>action</i>, int <i>thresholdTime</i> = 500, int <i>repeatTime</i> = 50 )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Sets action <i>action</i> to be triggered repetitively in intervals of <i>repeatTime</i>, after an initial delay of <i>thresholdTime</i>.</p>
<p>See also <a href="qabstractslider.html#triggerAction">triggerAction</a>() and <a href="qabstractslider.html#repeatAction">repeatAction</a>().</p>
<h3 class="fn"><a name="sliderChange"></a>void QAbstractSlider::sliderChange ( <a href="qabstractslider.html#SliderChange-enum">SliderChange</a> <i>change</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplement this virtual function to track slider changes such as <a href="qabstractslider.html#SliderChange-enum">SliderRangeChange</a>, <a href="qabstractslider.html#SliderChange-enum">SliderOrientationChange</a>, <a href="qabstractslider.html#SliderChange-enum">SliderStepsChange</a>, or <a href="qabstractslider.html#SliderChange-enum">SliderValueChange</a>. The default implementation only updates the display and ignores the <i>change</i> parameter.</p>
<h3 class="fn"><a name="sliderMoved"></a>void QAbstractSlider::sliderMoved ( int <i>value</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when <a href="qabstractslider.html#sliderDown-prop">sliderDown</a> is true and the slider moves. This usually happens when the user is dragging the slider. The <i>value</i> is the new slider position.</p>
<p>This signal is emitted even when tracking is turned off.</p>
<p>See also <a href="qabstractslider.html#tracking-prop">setTracking</a>(), <a href="qabstractslider.html#valueChanged">valueChanged</a>(), <a href="qabstractslider.html#sliderDown-prop">isSliderDown</a>(), <a href="qabstractslider.html#sliderPressed">sliderPressed</a>(), and <a href="qabstractslider.html#sliderReleased">sliderReleased</a>().</p>
<h3 class="fn"><a name="sliderPressed"></a>void QAbstractSlider::sliderPressed ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the user presses the slider with the mouse, or programmatically when setSliderDown(true) is called.</p>
<p>See also <a href="qabstractslider.html#sliderReleased">sliderReleased</a>(), <a href="qabstractslider.html#sliderMoved">sliderMoved</a>(), and <a href="qabstractslider.html#sliderDown-prop">isSliderDown</a>().</p>
<h3 class="fn"><a name="sliderReleased"></a>void QAbstractSlider::sliderReleased ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the user releases the slider with the mouse, or programmatically when setSliderDown(false) is called.</p>
<p>See also <a href="qabstractslider.html#sliderPressed">sliderPressed</a>(), <a href="qabstractslider.html#sliderMoved">sliderMoved</a>(), and <a href="qabstractslider.html#sliderDown-prop">sliderDown</a>.</p>
<h3 class="fn"><a name="triggerAction"></a>void QAbstractSlider::triggerAction ( <a href="qabstractslider.html#SliderAction-enum">SliderAction</a> <i>action</i> )</h3>
<p>Triggers a slider <i>action</i>. Possible actions are <a href="qabstractslider.html#SliderAction-enum">SliderSingleStepAdd</a>, <a href="qabstractslider.html#SliderAction-enum">SliderSingleStepSub</a>, <a href="qabstractslider.html#SliderAction-enum">SliderPageStepAdd</a>, <a href="qabstractslider.html#SliderAction-enum">SliderPageStepSub</a>, <a href="qabstractslider.html#SliderAction-enum">SliderToMinimum</a>, <a href="qabstractslider.html#SliderAction-enum">SliderToMaximum</a>, and <a href="qabstractslider.html#SliderAction-enum">SliderMove</a>.</p>
<p>See also <a href="qabstractslider.html#actionTriggered">actionTriggered</a>().</p>
<h3 class="fn"><a name="valueChanged"></a>void QAbstractSlider::valueChanged ( int <i>value</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the slider value has changed, with the new slider <i>value</i> as argument.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
